/// <reference path="F:\Html5 Game\Game project\js\libs\kangax-fabric-48.306.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\DBAbstractionLayer.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\GameCanvas.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Node.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\NodeType.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Planet.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Region.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Scale.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\System.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Universe.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Utilities.js"/>
this.Universe = function (name, regions) {

    //Verwijzingen
    var obj = this;

    //Variabelen
    var name = name;

    //var image = 'img/UNIVERSECONCEPT.png';
    var regionList = regions;

    //Constructor
    var _constructor = function () {
    }

    //Public functies
    obj.draw = function (context, scale) {
        try {
            if (scale == Scale.UNIVERSE) {
                context.clear();
                context.drawImage(image, 0, 0);
                for (region in regionList) {
                    regionList[region].draw(context, scale);
                }
            }
            else { // oi, universe doesnt have to do anything! delegate ->
                for (region in regionList) {
                    regionList[region].draw(context, scale);
                }
            }
        }
        catch (e) {
        }
    }

    //Private Functies
    _constructor();
};

